<ng-template #checkboxTemplate>
  <label
    [class.ant-table-selection-select-all-custom]="nzShowRowSelection"
    nz-checkbox
    [(ngModel)]="nzChecked"
    [nzDisabled]="nzDisabled"
    [nzIndeterminate]="nzIndeterminate"
    (ngModelChange)="nzCheckedChange.emit($event)">
  </label>
</ng-template>
<div class="ant-table-selection" *ngIf="nzShowRowSelection">
  <ng-container *ngIf="nzShowCheckbox">
    <ng-template [ngTemplateOutlet]="checkboxTemplate"></ng-template>
  </ng-container>
  <nz-dropdown nzPlacement="bottomLeft">
    <div nz-dropdown class="ant-table-selection-down">
      <i class="anticon anticon-down"></i>
    </div>
    <ul nz-menu class="ant-table-selection-menu">
      <li nz-menu-item *ngFor="let selection of nzSelections" (click)="selection.onSelect()">{{selection.text}}</li>
    </ul>
  </nz-dropdown>
</div>
<ng-container *ngIf="nzShowCheckbox && !nzShowRowSelection">
  <ng-template [ngTemplateOutlet]="checkboxTemplate"></ng-template>
</ng-container>
<ng-content></ng-content>
<div class="ant-table-column-sorter" *ngIf="nzShowSort">
      <span
        class="ant-table-column-sorter-up"
        [class.on]="nzSort == 'ascend'"
        [class.off]="nzSort != 'ascend'"
        title="↑"
        (click)="setSortValue('ascend')">
        <i class="anticon anticon-caret-up"></i>
      </span>
  <span
    class="ant-table-column-sorter-down"
    [class.on]="nzSort == 'descend'"
    [class.off]="nzSort != 'descend'"
    title="↓"
    (click)="setSortValue('descend')">
        <i class="anticon anticon-caret-down"></i>
      </span>
</div>
<nz-dropdown nzTrigger="click" *ngIf="nzShowFilter" [nzClickHide]="false" [hasFilterButton]="true" (nzVisibleChange)="dropDownVisibleChange($event)">
  <i class="anticon anticon-filter" [class.ant-table-filter-selected]="hasFilterValue" nz-dropdown></i>
  <ul nz-menu>
    <ng-container *ngIf="nzFilterMultiple">
      <li nz-menu-item *ngFor="let filter of multipleFilterList" (click)="checkMultiple(filter)">
        <label nz-checkbox [ngModel]="filter.checked"></label><span>{{filter.text}}</span>
      </li>
    </ng-container>
    <ng-container *ngIf="!nzFilterMultiple">
      <li nz-menu-item *ngFor="let filter of singleFilterList" (click)="checkSingle(filter)">
        <label nz-radio [ngModel]="filter.checked">{{filter.text}}</label>
      </li>
    </ng-container>
  </ul>
  <div class="ant-table-filter-dropdown-btns">
    <a class="ant-table-filter-dropdown-link confirm" (click)="hideDropDown()">
      <span (click)="search()">{{'Table.filterConfirm' | nzI18n}}</span>
    </a>
    <a class="ant-table-filter-dropdown-link clear" (click)="hideDropDown()">
      <span (click)="reset()">{{'Table.filterReset' | nzI18n}}</span>
    </a>
  </div>
</nz-dropdown>